home *** CD-ROM | disk | FTP | other *** search
- <?xml version="1.0"?>
- <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
-
- <xsl:variable name="Assessment">
- <c score="1" text="Unable to Scan"/>
- <c score="2" text="Severe Risk"/>
- <c score="3" text="Potential Risk"/>
- <c score="4" text="Security FYIs"/>
- <c score="5" text="Strong Security"/>
- </xsl:variable>
-
- <xsl:variable name="FileName" select="'file name here'"></xsl:variable>
-
- <xsl:template match="SecScan">
-
- <xsl:param name="assess" select="@Grade"/>
- <pre>
- Computer name:<xsl:value-of select="@Domain"/>\<xsl:value-of select="@Machine"/>
- IP address:<xsl:value-of select="@IP"/>
- Security report name:<xsl:value-of select="$FileName" />
- Scan date:<xsl:value-of select="@Date"/>
- <xsl:choose><xsl:when test="@HotfixDataVersion">Hotfix database version:<xsl:value-of select="@HotfixDataVersion"/></xsl:when></xsl:choose>
- Security assessment:<xsl:value-of select="document('')/*/xsl:variable[@name='Assessment']/c[@score=$assess]/@text"/>
-
- <xsl:choose>
- <xsl:when test="Check[@Type='1']">
- Operating System Scan Results
- <xsl:choose>
- <xsl:when test="Check[@Type='1'][@Cat='1']">
- Vulnerabilities
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='1'][@Cat='1']">
- </xsl:apply-templates>
- </xsl:for-each>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='1'][@Cat='2']">
- Best Practices
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='1'][@Cat='2']">
- </xsl:apply-templates>
- </xsl:for-each>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='3']">
- Internet Information Services (IIS) Scan Results
- <xsl:choose>
- <xsl:when test="Check[@Type='3'][@Cat='1']">
- Vulnerabilities
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='3'][@Cat='1']">
- </xsl:apply-templates>
- </xsl:for-each>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='3'][@Cat='2']">
- Best Practices
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='3'][@Cat='2']">
- </xsl:apply-templates>
- </xsl:for-each>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='2']">
- SQL Server Scan Results
- <xsl:choose>
- <xsl:when test="Check[@Type='2'][@Cat='1']">
- Vulnerabilities
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='2'][@Cat='1']">
- </xsl:apply-templates>
- </xsl:for-each>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='2'][@Cat='2']">
- Best Practices
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='2'][@Cat='2']">
- </xsl:apply-templates>
- </xsl:for-each>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='4']">
- Desktop Application Scan Results
- <xsl:choose>
- <xsl:when test="Check[@Type='4'][@Cat='1']">
- Vulnerabilities
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='4'][@Cat='1']">
- </xsl:apply-templates>
- </xsl:for-each>
- </xsl:when>
- </xsl:choose>
- <xsl:choose>
- <xsl:when test="Check[@Type='4'][@Cat='2']">
- Best Practices
- <xsl:for-each select=".">
- <xsl:apply-templates select="Check[@Type='4'][@Cat='2']">
- </xsl:apply-templates>
- </xsl:for-each>
- </xsl:when>
- </xsl:choose>
- </xsl:when>
- </xsl:choose>
- </pre>
- </xsl:template>
-
- <xsl:template match="Check">
- <xsl:param name="score" select="@Grade"/>
- Issue: <xsl:value-of select="@Name"/>
- Score: <xsl:value-of select="document('')/*/xsl:variable[@name='Assessment']/c[@score=$score]/@text"/>
- Result: <xsl:value-of select="Advice"/>
- </xsl:template>
- </xsl:stylesheet>